import ReactDOM from "react-dom";

function PortalContent({ children }) {
	return ReactDOM.createPortal(
		children,
		document.getElementById("portal-root")
	);
}

export default function PortalDemo() {
	return (
		<div>
			<h2>Portal Demo</h2>
			<PortalContent>我是传送门的内容</PortalContent>
		</div>
	);
}
